package encore.beans;


/**
 * IOC容器包装类
 * @author Plex
 *
 */
public interface  BeanFactory {    
	
	/**
	 * 根据标识名获取对应Bean实例
	 * @param name
	 * @return
	 * @throws BeansException
	 */
    Object getBean(String name)throws BeansException;
    
    /***
     * 根据唯一标识符和获取类型获取Bean对象
     * @param <T>
     * @param name
     * @param requiredType
     * @return
     * @throws BeansException
     */
    <T> T getBean(String name,Class<T> requiredType) throws BeansException;
    
    /**
     * 根据Bean类型获取实例
     * @param <T>
     * @param requiredType
     * @return
     * @throws BeansException
     */
    <T> T getBean(Class<T> requiredType) throws BeansException;
    
    
    Object getBean(String name,Object... args) throws BeansException;
    
    /**
     * 判断容器中是否含有 name 标识信息
     * @param name
     * @return
     */
    boolean containBean(String name);
    
    String[] getAliases(String name);
}
